We use the USDA.,csv to gain some insight on food nutrition. Dataset contains all foods in the USDA database in 100g amounts.

Exploring the data

Summary

ID Description Calories Protein TotalFat Carbohydrate Sodium SaturatedFat Cholesterol Sugar Calcium Iron Potassium VitaminC VitaminE VitaminD
Min. : 1001 BEEF,CHUCK,UNDER BLADE CNTR STEAK,BNLESS,DENVER CUT,LN,0" FA: 2 Min. : 0.0 Min. : 0.00 Min. : 0.00 Min. : 0.00 Min. : 0.0 Min. : 0.000 Min. : 0.00 Min. : 0.000 Min. : 0.00 Min. : 0.000 Min. : 0.0 Min. : 0.000 Min. : 0.000 Min. : 0.0000
1st Qu.: 8387 CAMPBELL,CAMPBELL’S SEL MICROWAVEABLE BOWLS,HEA : 2 1st Qu.: 85.0 1st Qu.: 2.29 1st Qu.: 0.72 1st Qu.: 0.00 1st Qu.: 37.0 1st Qu.: 0.172 1st Qu.: 0.00 1st Qu.: 0.000 1st Qu.: 9.00 1st Qu.: 0.520 1st Qu.: 135.0 1st Qu.: 0.000 1st Qu.: 0.120 1st Qu.: 0.0000
Median :13294 OIL,INDUSTRIAL,PALM KERNEL (HYDROGENATED),CONFECTION FAT : 2 Median :181.0 Median : 8.20 Median : 4.37 Median : 7.13 Median : 79.0 Median : 1.256 Median : 3.00 Median : 1.395 Median : 19.00 Median : 1.330 Median : 250.0 Median : 0.000 Median : 0.270 Median : 0.0000
Mean :14260 POPCORN,OIL-POPPED,LOFAT : 2 Mean :219.7 Mean :11.71 Mean : 10.32 Mean : 20.70 Mean : 322.1 Mean : 3.452 Mean : 41.55 Mean : 8.257 Mean : 73.53 Mean : 2.828 Mean : 301.4 Mean : 9.436 Mean : 1.488 Mean : 0.5769
3rd Qu.:18337 ABALONE,MIXED SPECIES,RAW : 1 3rd Qu.:331.0 3rd Qu.:20.43 3rd Qu.: 12.70 3rd Qu.: 28.17 3rd Qu.: 386.0 3rd Qu.: 4.028 3rd Qu.: 69.00 3rd Qu.: 7.875 3rd Qu.: 56.00 3rd Qu.: 2.620 3rd Qu.: 348.0 3rd Qu.: 3.100 3rd Qu.: 0.710 3rd Qu.: 0.1000
Max. :93600 ABALONE,MXD SP,CKD,FRIED : 1 Max. :902.0 Max. :88.32 Max. :100.00 Max. :100.00 Max. :38758.0 Max. :95.600 Max. :3100.00 Max. :99.800 Max. :7364.00 Max. :123.600 Max. :16500.0 Max. :2400.000 Max. :149.400 Max. :250.0000
NA (Other) :7048 NA’s :1 NA’s :1 NA’s :1 NA’s :1 NA’s :84 NA’s :301 NA’s :288 NA’s :1910 NA’s :136 NA’s :123 NA’s :409 NA’s :332 NA’s :2720 NA’s :2834

Interstingly, the maximum level of sodium is 38758 mg, which exceeds the daily recommended max of 2300 mg.It would interest us to know which food this maximum level of Sodium belongs to

which.max(USDA$Sodium)
## [1] 265
USDA$Description[265]
## [1] SALT,TABLE
## 7054 Levels: ABALONE,MIXED SPECIES,RAW ... ZWIEBACK

It’s not surprising that the food substance containing the maximum level of sodium is the table salt.

Let’s explore out which foods contain more than 10000mg of Sodium

HighSodium <- subset(USDA, Sodium > 10000)
kable(HighSodium)
ID Description Calories Protein TotalFat Carbohydrate Sodium SaturatedFat Cholesterol Sugar Calcium Iron Potassium VitaminC VitaminE VitaminD
265 2047 SALT,TABLE 0 0.00 0.00 0.00 38758 0.000 0 0.00 24 0.33 8 0.0 0.00 0
922 6075 SOUP,BF BROTH OR BOUILLON,PDR,DRY 213 15.97 8.89 17.40 26000 4.320 10 16.71 60 1.00 446 0.0 2.17 0
923 6076 SOUP,BEEF BROTH,CUBED,DRY 170 17.30 4.00 16.10 24000 1.990 4 14.51 60 2.23 403 0.0 0.00 0
925 6080 SOUP,CHICK BROTH OR BOUILLON,DRY 267 16.66 13.88 18.01 23875 3.430 13 17.36 187 1.03 309 1.1 0.46 0
926 6081 SOUP,CHICK BROTH CUBES,DRY 198 14.60 4.70 23.50 24000 1.200 13 0.00 190 1.87 374 1.0 0.09 NA
938 6115 GRAVY,AU JUS,DRY 313 9.20 9.63 47.49 11588 2.026 4 NA 140 9.30 279 1.0 NA NA
1303 6979 ADOBO FRESCO 271 2.00 20.90 18.60 17152 2.910 0 2.03 123 3.20 187 5.8 2.69 0
5321 18369 LEAVENING AGENTS,BAKING PDR,DOUBLE-ACTING,NA AL SULFATE 53 0.00 0.00 27.70 10600 0.000 0 0.00 5876 11.02 20 0.0 0.00 0
5324 18372 LEAVENING AGENTS,BAKING SODA 0 0.00 0.00 0.00 27360 0.000 0 0.00 0 0.00 0 0.0 0.00 0
5698 19225 DESSERTS,RENNIN,TABLETS,UNSWTND 84 1.00 0.10 19.80 26050 0.041 0 NA 3733 7.07 292 0.0 NA NA

How much sodium does CAVIAR contain in 100g?

USDA$Sodium[match("CAVIAR", USDA$Description)]
## [1] 1500

How big is this value? Lets’s compare it to the mean and standard deviation of Sodium levels aross the dataset

summary(USDA$Sodium)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##     0.0    37.0    79.0   322.1   386.0 38758.0      84
sd(USDA$Sodium, na.rm= TRUE)
## [1] 1045.417

Note that if we sum the resulting mean and standard deviation, we have around 1400mg, which is stiil smaller than in 100g of CAVIAR. This means that CAVIAR is pretty rich in Sodium compared to most of the foods in our dataset.

Visualizations

The graph has an interesting triangular shape. It looks like foods that re higher in proteins are typically lower in fats and vice- versa.

Zooming into the histogram above:

Before breaking down the histogram, initial observation revealed that more than 6000 foods have <200mg of VitaminC. However, after breakng down the histogram cells, it’s clear that over 4500 foods have infact <1mg of VitaminC.

The average amount of sugar seems pretty low across the dataset (around 5mg), but there are alot of outliers with extremely high levels of sugar.